package com.kmxd.ams.client.use.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 推送表
 *
 * @author nickbi
 * @since 2023-01-11
 */
@Data
@ColumnWidth(15)
@HeadRowHeight(15)
@ContentRowHeight(15)
@HeadStyle
@HeadFontStyle(fontHeightInPoints = 12)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentFontStyle(fontHeightInPoints = 10)
@ExcelIgnoreUnannotated
@Schema(description = "推送表对象")
public class UsePushListVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "主键")
  private Long id;

  @Schema(description = "推送类型:1申请,2主动")
  @ExcelProperty(value = "推送类型:1申请,2主动")
  private Integer type;

  @Schema(description = "全宗id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "全宗id")
  private Long fondsId;

  @Schema(description = "单位id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "单位id")
  private Long comId;

  @Schema(description = "申请人id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "申请人id")
  private Long userId;

  @Schema(description = "申请人名称")
  @ExcelProperty(value = "申请人名称")
  private String username;

  @Schema(description = "申请人部门id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "申请人部门id")
  private Long deptId;

  @Schema(description = "申请人部门名称")
  @ExcelProperty(value = "申请人部门名称")
  private String deptName;

  @Schema(description = "请求标题")
  @ExcelProperty(value = "请求标题")
  private String title;

  @Schema(description = "申请说明")
  @ExcelProperty(value = "申请说明")
  private String description;

  @Schema(description = "联系方式")
  @ExcelProperty(value = "联系方式")
  private String contact;

  @Schema(description = "利用目的 1，编史修志 2、工作考察 3、宣传教育 4、学术研究 5、经济建设 6、其他7")
  @ExcelProperty(value = "利用目的 1，编史修志 2、工作考察 3、宣传教育 4、学术研究 5、经济建设 6、其他7")
  private Integer purpose;

  @Schema(description = "程度；紧急，一般等")
  @ExcelProperty(value = "程度；紧急，一般等")
  private String level;

  @Schema(description = "状态，1.待处理，2已推送，3已驳回。")
  @ExcelProperty(value = "状态，1.待处理，2已推送，3已驳回。")
  private Integer status;

  @Schema(description = "1:开放所有权限，2:仅开放用户自身权限")
  @ExcelProperty(value = "1:开放所有权限，2:仅开放用户自身权限")
  private Integer options;

  /** 推送人员id */
  @Schema(description = "推送人员公司id")
  private Long pushComId;

  /** 推送人员id */
  @Schema(description = "推送人员全宗id")
  private Long pushFondsId;

  @Schema(description = "推送人员名称")
  @ExcelProperty(value = "推送人员名称")
  private String pushUsername;

  @Schema(description = "推送人员id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "推送人员id")
  private Long pushUserId;

  @Schema(description = "推送部门id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "推送部门id")
  private Long pushDeptId;

  @Schema(description = "推送部门名称")
  @ExcelProperty(value = "推送部门名称")
  private String pushDeptName;

  @Schema(description = "请求推送时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "请求推送时间")
  private Date pushTime;

  @Schema(description = "开始日期")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "开始日期")
  private Date startTime;

  @Schema(description = "结束日期")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "结束日期")
  private Date endTime;

  @Schema(description = "利用天数")
  @ExcelProperty(value = "利用天数")
  private Integer usingDay;

  @Schema(description = "备注")
  @ExcelProperty(value = "备注")
  private String remarks;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "创建人")
  private Long createdBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "创建时间")
  private Date createdTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "更新人")
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "更新时间")
  private Date updateTime;

  @Schema(description = "删除标识：0未删除，1删除")
  @ExcelProperty(value = "删除标识：0未删除，1删除")
  private Long delFlag;

  /** 在线浏览，有权限为1，没有权限为0 */
  @Schema(description = "在线浏览")
  private Boolean onlineBrowser;

  /** 原文浏览，有权限为1，没有权限为0 */
  @Schema(description = "原文浏览")
  private Boolean browserFile;

  /** 在线打印，有权限为1，没有权限为0 */
  @Schema(description = "在线打印")
  private Boolean onlinePrint;

  /** 下载，有权限为1，没有权限为0 */
  @Schema(description = "下载")
  private Boolean download;

  /** 下载源文件，有权限为1，没有权限为0 */
  @Schema(description = "下载源文件")
  private Boolean downloadSource;

  /** 摘录，有权限为1，没有权限为0 */
  @Schema(description = "摘录")
  private Boolean excerpt;
}
